<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	function search_button() {
		var search_kind = themaInsert_from.search_kind.value;
		var search = themaInsert_from.search.value;
		if (search == "" || search == null || search.length <= 0) {
			alert("검색값을 입력하세요");
		} else {
			alert(search);
			var url = "/food/thema/searchFood?search_kind=" + search_kind
					+ "&search=" + search;
			open(url, "confirm", "toolbar=no,location=no,"
					+ "status=no,menubar=no," + "scrollbars=yes,resizable=no,"
					+ "width=410,height=400");
		}
	}
	
	function themaInsert_from_submit() {
		var msg = null;
		var returnSubmit = false;
		if(themaInsert_from.thema_subject.value=="" || themaInsert_from.search.thema_subject.length<0){
			msg ="제목을 확인해주세요";
		}else if(themaInsert_from.thema_content.value=="" || themaInsert_from.search.thema_content.length<0){
			msg ="내용을 확인해주세요";
		}else if(themaInsert_from.file.value=="a" || themaInsert_from.file.length<=1){
			msg ="이미지을 확인해주세요";
		}else{
			returnSubmit=true;
		}
		
		if(msg != null){
			alert(msg);
		}
		return returnSubmit;
	}
</script>
</head>
<body>
<form name="themaInsert_from" action="/food/thema/themaInsert" method="post" enctype="multipart/form-data">
	<table width="1000px">
		<tr>
			<td colspan="10"><h1>Insert Thema</h1></td>
		</tr>
		<tr>
			<td>구분 :</td>
			<td>
				<select name="thema_type">
					<option value="1">데이트</option>
					<option value="2">상견례</option>
					<option value="3">회식</option>
				</select>
			</td>
		</tr>
		<tr>
			<td>지역 : </td>
			<td>
			<select name="thema_area1" >
					<option value="송파구">송파구</option>
					<option value="강남구">강남구</option>
					<option value="강동구">강동구</option>
			</select>
			</td>		
		</tr>
		<tr>
			<td>지역세부 : </td>
			<td>
			<select name="thema_area2" >
					<option value="삼전동">삼전동</option>
			</select>
			</td>		
		</tr>
		<tr>
			<td>음식구분 : </td>
			<td>
			<select name="thema_category1" >
					<option value="한식">한식</option>
			</select>
			</td>		
		</tr>
		<tr>
			<td>음식 상세 구분 : </td>
			<td>
			<select name="thema_category2" >
					<option value="비빔밥">비빔밥</option>
			</select>
			</td>		
		</tr>
		<tr>
			<td>제목 :</td>
			<td><input type="text" name="thema_subject" value="이건점말 테이스"></td>
		</tr>
		<tr>
			<td>내용 :</td>
			<td>
				<textarea  name="thema_content" rows="20" cols="30">
					내용을 입력해주세요.
					상세한 정보를 입력해주시는 분들께는
					소정의 상품을 드리고 싶네요~ ^^
				</textarea>
			</td>
		</tr>
		<tr>
			<td>사진 :</td>
			<td><input type="file" name="file" value="a" onclick=""></td>
		</tr>
		<tr>
			<td colspan="3">
				<input type="submit" value="등록하기" onclick="return themaInsert_from_submit()">
				<input type="text" name="member_id" value="${sessionId }"> 
			</td>
		</tr>
		
		
	</table>
</form>
</body>
</html>